﻿using System;
using System.Collections.Generic;
using OurSite.Business.Picture;

namespace OurSite.Business.Video
{
    public class Video : BaseClass
    {
        public virtual int VideoCode { get; set; }
        public virtual Guid EventId { get; set; }
        public virtual string URL { get; set; }
        public virtual string YoutubeId
        {
            get
            {
                int lastSlash = URL.LastIndexOf("/") + 1;
                return URL.Substring(lastSlash);
            }

        }
        public virtual string Caption { get; set; }
        public virtual string Duration { get; set; }
        public virtual bool IsFavorite { get; set; }
        public virtual bool IsVisible { get; set; }
        public virtual int Order { get; set; }
        public virtual IList<People> People { get; set; }
        public virtual Event.Event ParentEvent { get; set; }
        public virtual DateTime CreatedDate { get; set; }
        public virtual DateTime ModifiedDate { get; set; }
    }
}
